﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Brain.Editor
{
    public partial class InputTextDialog : Form
    {
        public string InputText { get { return this.textBox1.Text; } }

        public InputTextDialog()
        {
            InitializeComponent();
        }
        public InputTextDialog(string Title, string label)
        {
            InitializeComponent();
            this.Text = Title;
            this.label1.Text = label;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }

        public static DialogResult Show(string Title, string Label, out string chosen)
        {
            InputTextDialog dialog = new InputTextDialog(Title, Label);

            DialogResult result = dialog.ShowDialog();
            chosen = dialog.InputText;

            return result;
        }
    }
}
